package main

import (
	"io/ioutil"
	"os"
)

func main() {
	if len(os.Args) < 2 {
		println("input the file name")
	} else {
		n := os.Args[1]
		p, _ := os.Getwd()
		l := p + "/" + n
		s, _ := os.Stat(l)
		if s != nil {
			if s.IsDir() {
				println("file " + n + " is dir")
				return
			}
			a, err := ioutil.ReadFile(p + "/" + n)
			if err != nil {
				println(err.Error())
				return
			} else {
				str := string(a)
				print(str)
			}
		} else {
			println("file " + n + " does not exist !")
			return
		}

	}

}
